package com.sky.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Description TODO
 * @Author bo.li
 * @Date 2024/10/8 16:33
 * @Version 1.0
 */
@Data
public class PageDto {

    //页码
    @ApiModelProperty("分页页码")
    private int page;

    //每页显示记录数
    @ApiModelProperty("每页记录数")
    private int pageSize;

    public void check(){
        if(page <= 0){
            page = 1;
        }
        if(pageSize <=0 || pageSize > 100){
            pageSize = 10;
        }
    }
}